﻿@model Identity.Api.Models.AccountViewModels.RegisterViewModel

@{
    ViewData["Title"] = "Register";

    var requestQuery = ViewContext.HttpContext.Request.Query;

    requestQuery.TryGetValue("ReturnUrl", out var returnUrl);

    string partialView;

    if (returnUrl.Contains("client_id=js"))
    {
        Layout = "_Layout-SPA";
        partialView = "_RegisterPartial-SPA.cshtml";
    }
    else
    {
        partialView = "_RegisterPartial-MVC.cshtml";
    }

}

<partial name=@partialView model=@Model />

@section Scripts {
    @{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
}
